

import java.rmi.Naming;
import java.rmi.Remote;
import java.rmi.registry.LocateRegistry;
import courseData.CourseDataManageController;
import courseManageDataService.CourseManageDataService;

import selectCourseData.selectCourseDataController;
import selectCourseDataService.SelectCourseDataService;
import userData.UserDataController;
import userDataService.UserDataService;
import frameData.FrameDataController;
import frameDataService.FrameDataService;




public class main {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Frame();
		try {
			 LocateRegistry.createRegistry(3000);  
			 LocateRegistry.createRegistry(3100);  
			 LocateRegistry.createRegistry(3200);  
			 LocateRegistry.createRegistry(3300);  
			
			 UserDataService ud = new UserDataController();
			 Naming.rebind("rmi://127.0.0.1:3000/UserDataService",(Remote) ud); 
			 
			 CourseManageDataService cmd= new CourseDataManageController();
			 Naming.rebind("rmi://127.0.0.1:3100/CourseManageDataService",(Remote) cmd); 
			
			 SelectCourseDataService scd = new selectCourseDataController();
			 Naming.rebind("rmi://127.0.0.1:3200/SelectCourseDataService",scd);
			 FrameDataService fd=new FrameDataController();
			 Naming.rebind("rmi://127.0.0.1:3300/FrameDataService",fd);
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
